﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Runda.CMS.Common.Utility
{
    public class JsExtension
    {
        public static  String CreateModalWindowScript(String url, String returnControlID, Nullable<int> iWidth, Nullable<int> iHeight)
        {
            String script = "";
            script = "showModalWindow('" + url + "',";
            script += (returnControlID == null ? "null" : ("'" + returnControlID + "'"));
            script += ",";
            script += (iWidth == null ? "null" : ("'" + iWidth.Value.ToString() + "'"));
            script += ",";
            script += (iHeight == null ? "null" : ("'" + iHeight.Value.ToString() + "'"));
            script += ");";

            return script;
        }
    }
}
